package com.learn.mapper;

import com.learn.pojo.User;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/02/21
 * @description 相当于dao接口
 */
public interface UserMapper {
    User selectById(Integer id);

    List<User> selectAll();

    Map<String, Object> sellectOneMap(Integer id);

    List<Map<String, Object>> sellectAllMapList();

    @MapKey("id")
        // 指定那个字段是这个嵌套map的大键
    Map<Integer, Map<String, Object>> sellectALLBigMap();

    User selectResultMap(Integer id);

    Long selectCount();
}
